<?php
include('../mysqli_connect.php');
$userId = $_GET['userId'];
$sql = "delete from user where user_id={$userId};";
$res = mysqli_query($dbc, $sql);
if ($res) {
  $response = array('status' => true, 'message' => '删除用户成功', 'data' => $res);
  echo json_encode($response);
} else {
  $response = array('status' => false, 'message' => '删除用户失败,请检查外键约束', 'error' => mysqli_error($dbc));
  echo json_encode($response);
}
